<!--根据这个页单独设置样式-->
<style>
    .table-responsive {overflow-x: inherit}
    td {vertical-align: middle !important;}
    .node-list li{display: inline-block}
    .buttonbor{display: block;border-bottom: 10px solid #fff;}

</style>
<div>
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">
            发货
            <div class="pull-right">
                <a  class="btn btn-sm btn-default" onclick="history.go(-1)">返回详情</a>
            </div>
        </h1>
    </div>
    <div class="padder-md m-b-none m-t" style="padding-top: 0">
        <div class="panel panel-default">
            <div class="panel-heading">已发货</div>
            <div class="panel-body">
                <div class="table-responsive">
                <table class="table table-striped table-bordered b-t b-light">
                    <thead>
                    <tr>
                        <th style="padding-left: 30px">快递</th>
                        <th>单号</th>
                        <th width="20%">商品</th>
                        <th >规格</th>
                        <th>数量</th>
                        <th>时间</th>
                    </tr>
                    </thead>
                    <tbody style="padding-left: 30px">
                    <tr ng-repeat="data in ctrl.vm.data.delivered">
                        <td style="padding-left: 30px">{{data.name}}</td>
                        <td>{{data.express_id}}</td>
                        <td>
                            <div ng-repeat="item in data.product" style="margin: 10px 0">
                                {{item.name}}
                            </div>
                        </td>
                        <td>
                            <div ng-repeat="item in data.product"  style=" margin: 5px 0">
                                {{item.attr_value_name}}
                            </div>
                        </td>
                        <td>
                            <div ng-repeat="item in data.product"  style=" margin: 5px 0">
                                {{item.qty}}
                            </div>
                        </td>
                        <td>
                            {{data.created_at}}
                        </td>
                    </tr>
                    <tr ng-if="!ctrl.vm.data.delivered.length">
                        <td colspan="12" class="text-center">暂无数据！</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading" style="padding-left: 20px">待发货</div>
            <div class="panel-body">
            <div class="table-responsive"  ng-if="ctrl.vm.data.not_delivered.length">
                <table class="table table-bordered b-t b-light">
                    <thead>
                    <tr>
                        <th></th>
                        <th >商品</th>
                        <th>数量</th>
                        <th>发货数量</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="data in ctrl.vm.data.not_delivered">
                        <td>
                            <label class="i-checks">
                                <input type="checkbox" ng-model="data.select"><i></i>
                            </label>
                        </td>
                        <td>{{data.name}}</td>
                        <td>{{data.qty}}</td>
                        <td><input type="text" class="form-control" style="width: 35%" ng-model="data.qtys"></td>
                    </tr>
                    </tbody>
                </table>
                <div style="height:50px;line-height: 50px;">
                    快递  :
                    <select style="padding-left: 5px;margin-left: 128px;width:260px;border:1px solid #ccc;height:30px;" ng-model="ctrl.vm.express_id" >
                        <option value="">请选择快递</option>
                        <option ng-repeat="test in ctrl.vm.kuaiList" value="{{test.id}}">
                            {{test.name}}
                        </option>
                    </select>
                </div>
                <div style="height:50px;line-height: 50px;">
                    单号 :
                    <input style="padding-left: 5px;margin-left: 128px;width:260px;border:1px solid #ccc;height:30px;" type="text" ng-model="ctrl.vm.express_no">
                </div>
                <div style="height:50px;line-height: 50px;padding-left: 165px"><button class="btn btn-sm btn-success" ng-click="ctrl.vm.shipments()">发货</button></div>
            </div>
            </div>
            <div ng-if="!ctrl.vm.data.not_delivered.length"  style="padding: 30px">
                <td colspan="12" class="text-center">全部商品发货完毕</td>
            </div>
        </div>
    </div>
</div>